package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.KkOrderDeliveryMapper;
import com.ruoyi.system.domain.KkOrderDelivery;
import com.ruoyi.system.service.IKkOrderDeliveryService;

/**
 * 商城订单物流Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-24
 */
@Service
public class KkOrderDeliveryServiceImpl implements IKkOrderDeliveryService 
{
    @Autowired
    private KkOrderDeliveryMapper kkOrderDeliveryMapper;

    /**
     * 查询商城订单物流
     * 
     * @param id 商城订单物流主键
     * @return 商城订单物流
     */
    @Override
    public KkOrderDelivery selectKkOrderDeliveryById(Integer id)
    {
        return kkOrderDeliveryMapper.selectKkOrderDeliveryById(id);
    }

    /**
     * 查询商城订单物流列表
     * 
     * @param kkOrderDelivery 商城订单物流
     * @return 商城订单物流
     */
    @Override
    public List<KkOrderDelivery> selectKkOrderDeliveryList(KkOrderDelivery kkOrderDelivery)
    {
        return kkOrderDeliveryMapper.selectKkOrderDeliveryList(kkOrderDelivery);
    }

    /**
     * 新增商城订单物流
     * 
     * @param kkOrderDelivery 商城订单物流
     * @return 结果
     */
    @Override
    public int insertKkOrderDelivery(KkOrderDelivery kkOrderDelivery)
    {
        return kkOrderDeliveryMapper.insertKkOrderDelivery(kkOrderDelivery);
    }

    /**
     * 修改商城订单物流
     * 
     * @param kkOrderDelivery 商城订单物流
     * @return 结果
     */
    @Override
    public int updateKkOrderDelivery(KkOrderDelivery kkOrderDelivery)
    {
        kkOrderDelivery.setUpdateTime(DateUtils.getNowDate());
        return kkOrderDeliveryMapper.updateKkOrderDelivery(kkOrderDelivery);
    }

    /**
     * 批量删除商城订单物流
     * 
     * @param ids 需要删除的商城订单物流主键
     * @return 结果
     */
    @Override
    public int deleteKkOrderDeliveryByIds(Integer[] ids)
    {
        return kkOrderDeliveryMapper.deleteKkOrderDeliveryByIds(ids);
    }

    /**
     * 删除商城订单物流信息
     * 
     * @param id 商城订单物流主键
     * @return 结果
     */
    @Override
    public int deleteKkOrderDeliveryById(Integer id)
    {
        return kkOrderDeliveryMapper.deleteKkOrderDeliveryById(id);
    }
}
